package com.zbkj.common.model.monitor;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 监控设备状态对象
 * +----------------------------------------------------------------------
 * @author xiaolic
 * +----------------------------------------------------------------------
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("zfb_monitor_device_status")
@ApiModel(value="ZfbMonitorDeviceStatus对象", description="监控设备状态表")
public class ZfbMonitorDeviceStatus implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "商家ID")
    private Integer merchantId;

    @ApiModelProperty(value = "设备license")
    private String license;

    @ApiModelProperty(value = "套餐类型（1=免费 2=付费）")
    private Integer mealType;

    @ApiModelProperty(value = "当前到期时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date expireTime;

    @ApiModelProperty(value = "状态（0=关闭 1=开启）")
    private Integer status;

    @ApiModelProperty(value = "最近一次的订单号")
    private String lastOrderNo;
    
    @ApiModelProperty(value = "最近一次操作类型（1=开启 2=关闭）")
    private Integer lastOperType;
    
    @ApiModelProperty(value = "最近一次操作结果（1=成功 2=失败）")
    private Integer lastOperResult;
    
    @ApiModelProperty(value = "最近一次操作返回的错误信息")
    private String lastOperErrorInfo;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
}
